Skip to content

Conversation

etpinard
Copy link
Contributor

fixes #2663 (aka the react-plotly.js issue that resulted in negative svg mesures)

There's probably a better fix out there, but our autosize logic is such a mess that I was happy with this here. I hope @alexcjohnson will agree.

@etpinard etpinard added bug something broken status: reviewable labels Jun 27, 2018
@@ -357,7 +358,7 @@ plots.supplyDefaults = function(gd, opts) {
initialAutoSize = missingWidthOrHeight && (autosize || autosizable);

if(initialAutoSize) plots.plotAutoSize(gd, newLayout, newFullLayout);
else if(missingWidthOrHeight) plots.sanitizeMargins(gd);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦‍♂️

@alexcjohnson
Copy link
Collaborator

a mess indeed. This looks good to me! 💃

@etpinard etpinard merged commit bcab36e into master Jun 27, 2018
@etpinard etpinard deleted the plots-resize-sanitize-margins branch June 27, 2018 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling Plots.resize on a (very) small <div> leads to SVG errors
2 participants